#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#     Filename @  global.py
#       Author @  Huoty
#  Create date @  2015-07-02 17:28:54
#  Description @  
# *************************************************************

a = 0
def foo():
    global a
    print a
    a += 1

# Script starts from here

i = 0
while i < 10:
    foo()
    i += 1
